package cate.game.role.pvp.teampvp.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTeamPvp;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "组队竞技领取挑战次数奖励的请求")
public class TeamPvpChallengeRewardReq implements MsgInput {
    @NoteField("宝箱tid")
    public int tid;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getPvp().teamPvp.gotReward(tid);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTeamPvp.GET_REWARD_REQ;
    }
}
